package com.sh.rpc.fault.tolerant;

import com.sh.rpc.spi.SpiLoader;
import sun.security.provider.ConfigFile;

/**
 * 容错工厂
 */
public class ToleranStrategyFactory {

    static {
        SpiLoader.load(TolerantStrategy.class);
    }

    private static  final  TolerantStrategy DEFAULT_RETRY_STRATEGY = new FailFastTolerantStrategy();


    public static TolerantStrategy getInstance(String key){
        return SpiLoader.getInstance(TolerantStrategy.class, key);
    }

}
